﻿using System;

namespace HealthCommunity
{
	public partial class AddUser : System.Web.UI.Page
	{
		protected void Page_Load(object sender, EventArgs e)
		{
			var permited = false;

			var u = SiteContext.Current.CurrentUser;

			if(u != null && u.Role != null)
			{
				permited = u.Role.RoleName.ToLower().Equals("admin") || u.Role.RoleName.ToLower().Equals("storemanager");
			}

			if(!permited)
			{
				Server.Transfer("~/Home.aspx");
			}

		}
	}
}